/*
Kakine
ActionScript Framework
Copyright © 2011, PUNY, LLC.

This file is part of KAKINE.

KAKINE is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

KAKINE is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with KAKINE.  If not, see <http://www.gnu.org/licenses/>.
*/ 
package com.puny.mvc.views.effect
{
	import com.puny.mvc.views.View;
	
	import flash.events.Event;

	/**
	 * @private
	 * deprecated
	 */
	public class IParticleField extends View
	{
		public static const EFFECT_END:String = "Effect End";
		protected var _stopping:Boolean = true;
		public function IParticleField(src:Object=null) {
			super(src);
		}

		protected function randRange(min:Number, max:Number):Number
		{
		    var randomNum:Number = (Math.random() * (max - min )) + min;
		    return randomNum;
		}
		
		public function play():void {
			if (_stopping) {
				_stopping = false;
				addEventListener(Event.ENTER_FRAME, frameHandler, false, 0, true);
			}
		}
		
		protected function frameHandler(event:Event):void {}
		
		public function stop():void {
			_stopping = true;			
		}
		
		public function playOnce():void {
			play();
			stop();
		}
		
	}
}